//
//  SubjectViewController.m
//  ProjectForA
//
//  Created by apple on 14/11/22.
//  Copyright (c) 2014年 hmengwei. All rights reserved.
//

#import "SubjectViewController.h"

@interface SubjectViewController ()<UIWebViewDelegate>

@end

@implementation SubjectViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://breadtrip.com/mobile/destination/2/6/top10_list/"]];
    
    [self.view addSubview:web];
    [web loadRequest:request];
    
    web.delegate = self;  //设置代理
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)webViewDidStartLoad:(UIWebView *)webView
{
    NSLog(@"start..");
}
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
    NSLog(@"finish..");
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
    NSLog(@"%@", error);
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
